package com.cskaoyan.mapper.wxMapper.po2votransfer;

import com.cskaoyan.bean.po.wxPo.MarketKeyword;
import com.cskaoyan.bean.vo.vxVo.search.HotKeywordVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 该工具 mapper 用于
 * 1. 将 po 对象 转化为 vo 对象
 * 2. 将 poList 对象 转化为 voList 对象
 * 3. 将 多个对象 向 一个对象 映射; 即 形如"  class A , class B , class C{ a, b}"
 * @author: 陈慧颖
 * @time: Created by chy on 2022/6/7 16:32
 */
@Mapper
public interface MarketKeywordTransferMapper {
    MarketKeywordTransferMapper INSTANCE = Mappers.getMapper(MarketKeywordTransferMapper.class);

    @Mappings({
            // @Mapping(source = "name", target = "studentName"),
            // @Mapping(source = "age", target = "studentAge")
    })
    HotKeywordVo po2Vo(MarketKeyword studentPO);
    List<HotKeywordVo> poList2VoList(List<MarketKeyword> studentPO);

}
